home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
055b.dms
/
055b.adf
/
3D_MENUS
/
3d_menus_source.lha
/
3D_ICON_Buttons.amos
/
3D_ICON_Buttons.amosSourceCode
next >
Wrap
AMOS Source Code
|
1992-02-26
|
3KB
|
136 lines
'
'************************************************
'
' 3D ICON BUTTONS
' ---------------
' By Malcolm Lavery 1994
' ----------------------
'
'interface style 3d buttons for Amos classic
'and Easy Amos.
'
'
' Uses any images stored in the icon bank
'
' ie: icon 1(button 1 out)
' icon 2(button 1 in)
'
' icon 3(button 2 out)
' icon 4(button 2 in)
'
' icon 5(button 3 out)
' icon 6(button 3 in)
'
' etc etc
'
'************************************************
'
'
Screen Open 0,640,256,16,Hires
Curs Off : Cls 0 : Flash Off
Get Icon Palette
Limit Mouse 0,0 To 640,500
'
_3D_DISPLAY[0,0,640,255,0,2]
'
Reserve Zone 5
'
_ICON_BUTTON[1,100,100,1,0]
_ICON_BUTTON[2,140,100,3,0]
_ICON_BUTTON[3,180,100,6,0]
_ICON_BUTTON[4,200,100,6,0]
_ICON_BUTTON[5,220,100,6,0]
'
Do
'
_CHECK_BUTTONS
'
Loop
'
Procedure _ICON_BUTTON[_ZONENUMBER,X,Y,IMAGE,IN_OUT]
'
WIDTH=Deek(Icon Base(IMAGE))*16
HEIGHT=Deek(Icon Base(IMAGE)+2)
'
If IN_OUT=0
Paste Icon X,Y,IMAGE
End If
'
If IN_OUT=1
Paste Icon X,Y,IMAGE+1
End If
'
Set Zone _ZONENUMBER,X,Y To X+WIDTH,Y+HEIGHT
'
End Proc
Procedure _CHECK_BUTTONS
'
TEST=Mouse Zone
TESTTWO=Mouse Key
'
If TESTTWO=1 and TEST=1
_ICON_BUTTON[1,100,100,1,1]
Bell
Wait 10
_ICON_BUTTON[1,100,100,1,0]
End If
'
If TESTTWO=1 and TEST=2
_ICON_BUTTON[2,140,100,3,1]
Bell
Wait 10
_ICON_BUTTON[2,140,100,3,0]
End If
'
If TESTTWO=1 and TEST=3
_ICON_BUTTON[3,180,100,6,1]
Bell
Wait 10
_ICON_BUTTON[3,180,100,6,0]
End If
'
If TESTTWO=1 and TEST=4
_ICON_BUTTON[4,200,100,6,1]
Bell
Wait 10
_ICON_BUTTON[4,200,100,6,0]
End If
'
If TESTTWO=1 and TEST=5
_ICON_BUTTON[5,220,100,6,1]
Bell
Wait 10
_ICON_BUTTON[5,220,100,6,0]
End If
'
End Proc
Procedure _3D_DISPLAY[X,Y,WIDTH,HEIGHT,IN_OUT,_FILL]
'
'
'
If IN_OUT=0
HILIGHT=1
SHADOW=3
End If
'
'
If IN_OUT=1
HILIGHT=3
SHADOW=1
End If
'
'
Ink HILIGHT
Draw X,Y To X+WIDTH,Y
Draw X,Y To X,Y+HEIGHT
'
Ink SHADOW
Draw X+WIDTH,Y To X+WIDTH,Y+HEIGHT
Draw X+WIDTH,Y+HEIGHT To X,Y+HEIGHT
'
Ink _FILL
Bar X+1,Y+1 To X+WIDTH-1,Y+HEIGHT-1
'
'
'
End Proc